package com.market.mapper;

import com.market.common.request.WorkerRequestParams;
import com.market.entity.Worker;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author :  KanShan
 * @version : 1.8
 * @Date: 2021/11/29/14:32
 * @注释 :
 */
public interface WorkerMapper {
    List<Worker> selectList();

    List<Worker> selectListById(@Param("id") Long id);

    List<Worker> selectLisByName(@Param("name") String name);

    List<Worker> selectId();

    int insert(@Param("worker") Worker worker);

    int deleteWorker(@Param("id") Long id);


    int updateWorker(@Param("worker") Worker worker);

    int updateWorkerPassword(@Param("workerId") Integer workerId, @Param("password") String password);

    /**
     * 根据id查询门店名称
     *
     * @param workerId
     * @return
     */
    Worker selectShopName(@Param("workerId") Long workerId);

    /**
     * 查询登录信息
     *
     * @param workerId
     * @return
     */
    Worker selectLogin(@Param("workerId") Long workerId);

}
